<template>
    <section class="viewArea"> 
        <div class="containHead">域名统计分析</div>
        <section class="mainContainer" style="overflow:hidden">   
            <SwitchChartView /> 
        </section> 
    </section>
</template>

<script> 
/*******
 * explain: 弹窗不可选域名，在查询后对该域名进行新增，修改操作 
 *         否则：容易导致新增已存在数据的域名
 * 
 * *********/
import { mapGetters } from 'vuex'  
import SwitchChartView from './SwitchChartView'
export default {
    name: "switchManage", 
    components: { 
        SwitchChartView,
    },
    data(){
        return {
            tabType: 'tableView',
            create: true,
            dialogFormVisible: false, 
            tableView: true,
            chartView: true, 
            last_domain_id: '',
            domain_name: '',
            last_domain_name: '',
            filters: {
                customer_id: [], 
                domain_id: ''
            },  
        }
    },
    watch:{ 
    },
    created(){ 
        //获取所有客户
        this.$store.dispatch('fetchAllCustomerList')
        //获取所有域名
        // this.$store.dispatch('fetchCustomerRelateDomain', {params:{customer_id: ''}});
    },
    methods: {
        fetchCustomerRelateDomain(){ 
            let _this = this
            let condition = {
                params: {
                    customer_id: _this.filters.customer_id
                },
                cb(_data){  
                    _this.$refs.domainSelect.clearSingleSelect()
                }
            }
            _this.$store.dispatch('fetchCustomerRelateDomain', condition);
        },        
    },
}
</script>

<style lang="scss">
    .filter-item:not(:first-child){
        margin-left: 20px;
        margin-bottom: 20px;
    }
   .mainContentWrap .filter-item .ivu-tag-text{
        color: #495060!important;
    }
    .viewContainer{
    .tabBox{
        padding: 0 20px;
        min-height: 600px;
    }
    .title{
        border-left:  3px solid #409EFF;
        font-size: 16px;
        color: #333;
        padding-left: 10px;
        margin-bottom: 15px;
    }
    }
</style>

